Updated build in guide.md
authorJohn Zhang <john@zhang.io>
Thu, 12 Mar 2015 01:59:19 +0000 (18:59 -0700)
committerJohn Zhang <john@zhang.io>
Thu, 12 Mar 2015 01:59:19 +0000 (18:59 -0700)
autogenerates to guide.html

src/doc/guide.md

index 3459fb7e98f07711013c171df9fb5eb64145b6ac..18028b175ddbf17774ccc244694f6f4abda24564 100644 (file)
@@ -80,7 +80,7 @@ class="s1">   Compiling</span> hello_world v0.0.1 (file:///path/to/project/hello
 And then run it:
 
 ```shell
-$ ./target/hello_world
+$ ./target/debug/hello_world
 Hello, world!
 ```
 
@@ -90,12 +90,18 @@ We can also use `cargo run` to compile and then run it, all in one step:
 <span style="font-weight: bold"
 class="s1">     Fresh</span> hello_world v0.0.1 (file:///path/to/project/hello_world)
 <span style="font-weight: bold"
-class="s1">   Running</span> `target/hello_world`
+class="s1">   Running</span> `target/debug/hello_world`
 Hello, world!</code></pre>
 
 You'll now notice a new file, `Cargo.lock`. It contains information about our
 dependencies. Since we don't have any yet, it's not very interesting.
 
+Once you're ready for release, you can use `cargo build --release` to compile your files with optimizations turned on:
+
+<pre><code class="language-shell"><span class="gp">$</span> cargo build --release
+<span style="font-weight: bold"
+class="s1">   Compiling</span> hello_world v0.0.1 (file:///path/to/project/hello_world)</code></pre>
+
 ## Adding a dependency
 
 It's quite simple to add a dependency. Simply add it to your `Cargo.toml` file: